/*
 * Project: Sudoku Explainer
 * Copyright (C) 2006-2007 Nicolas Juillerat
 * 
 * Project: Sudoku Hint Engine for Android
 * Copyright (C) 2010-2013 Emanuel Moecklin
 * 
 * Available under the terms of the Lesser General Public License (LGPL)
 */
package com.onegravity.sudoku.solver.core;

import com.onegravity.sudoku.solver.accumulator.HintsAccumulator;
import com.onegravity.sudoku.solver.accumulator.StopHintProductionException;
import com.onegravity.sudoku.solver.data.Grid;

/**
 * Interface for solving techniques that are able to produce hints.
 * @see com.onegravity.sudoku.solver.core.Hint
 */
public interface HintProducer {

    /**
     * Get all the hints that applicable of the given grid according to
     * this solving technique.
     * @param grid the sudoku grid
     * @param accu the accumulator in which to add hints
     * @throws StopHintProductionException if the search for hints has been interrupted.
     * This exception might be thrown by the accumulator and you must not try to catch it.
     */
    public void getHints(Grid grid, HintsAccumulator accu) throws StopHintProductionException, InterruptedException;

    /**
     * Returns the names of the hints the producer can produce in a form readable by humans.
     * May return Null or empty string to indicate that there is nothing to display
     * @return the names of the hints the producer can produce in a form readable by humans
     */
    public String getProducerName();
}